import React, { Component } from "react";

class App extends Component {
  state = {
    neirong: "",
  };
  shguru = (e) => {
    console.log(e.target.value);
    this.setState({
      neirong: e.target.value,
    });
  };
  render() {
    return (
      <div>
        <input
          type="text"
          name=""
          id=""
          value={this.state.neirong}
          onChange={this.shguru}
        />
        <input type="submit" name="" id="" value="提交" />
      </div>
    );
  }
}

export default App;
